﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HCQ2_Model.WeiXinApiModel.ParamModel
{
    public class DetectionWodParam: BaseWeiXinModel
    {
        /// <summary>
        ///  课件id
        /// </summary>
        [Required(ErrorMessage= "课件id【file_id】必填项")]
        public int file_id { get; set; }
        /// <summary>
        ///  关卡id
        /// </summary>
        [Required(ErrorMessage = "关卡id【cp_id】必填项")]
        public int cp_id { get; set; }
        /// <summary>
        ///  总时长
        /// </summary>
        [Required(ErrorMessage = "总时长【date_len】必填项")]
        public decimal date_len { get; set; } = 0;
        /// <summary>
        ///  总得分
        /// </summary>
        [Required(ErrorMessage = "总得分【score】必填项")]
        public int score { get; set; } = 0;
        /// <summary>
        ///  明细
        /// </summary>
        public List<DetectionWodDetail> options { get; set; }
    }
    public class DetectionWodDetail
    {
        /// <summary>
        ///  单词
        /// </summary>
        [Required(ErrorMessage = "单词【word】必填项")]
        public string word { get; set; }
        /// <summary>
        ///  检测字母
        /// </summary>
        [Required(ErrorMessage = "检测字母【detletter】必填项")]
        public string detletter { get; set; }
        /// <summary>
        ///  选择字母
        /// </summary>
        [Required(ErrorMessage = "选择字母【choletter】必填项")]
        public string choletter { get; set; }
        /// <summary>
        ///  状态
        ///  0：错误
        ///  1：正确
        /// </summary>
        [Required(ErrorMessage = "状态【status】必填项")]
        public int status { get; set; } = 1;
        /// <summary>
        ///  得分
        /// </summary>
        [Required(ErrorMessage = "得分【score】必填项")]
        public int score { get; set; } = 0;
        /// <summary>
        ///  时长
        /// </summary>
        [Required(ErrorMessage = "时长【duration】必填项")]
        public decimal duration { get; set; } = 0;
        /// <summary>
        ///  考察字母下标
        /// </summary>
        [Required(ErrorMessage = "考察字母下标【serial】必填项")]
        public int serial { get; set; } = 0;
    }
}
